/**
 * @author Liu Cong
 */

(function(){

/**
 * The following constants are used throughout serialization and 
 * deserialization to detect the AMF marker and encoding types.
 *
 */
FireAMF.Constants = {
    AMF0_NUMBER            : 0x00,
    AMF0_BOOLEAN           : 0x01,
    AMF0_STRING            : 0x02,
    AMF0_OBJECT            : 0x03,
    AMF0_MOVIECLIP         : 0x04,
    AMF0_NULL              : 0x05,
    AMF0_UNDEFINED         : 0x06,
    AMF0_REFERENCE         : 0x07,
    AMF0_MIXEDARRAY        : 0x08,
    AMF0_OBJECTTERM        : 0x09,
    AMF0_ARRAY             : 0x0a,
    AMF0_DATE              : 0x0b,
    AMF0_LONGSTRING        : 0x0c,
    AMF0_UNSUPPORTED       : 0x0e,
    AMF0_XML               : 0x0f,
    AMF0_TYPEDOBJECT       : 0x10,
    AMF0_AMF3              : 0x11,
    AMF0_OBJECT_ENCODING   : 0x00,

    AMF3_UNDEFINED         : 0x00,
    AMF3_NULL              : 0x01,
    AMF3_BOOLEAN_FALSE     : 0x02,
    AMF3_BOOLEAN_TRUE      : 0x03,
    AMF3_INTEGER           : 0x04,
    AMF3_NUMBER            : 0x05,
    AMF3_STRING            : 0x06,
    AMF3_XML               : 0x07,
    AMF3_DATE              : 0x08,
    AMF3_ARRAY             : 0x09,
    AMF3_OBJECT            : 0x0A,
    AMF3_XMLSTRING         : 0x0B,
    AMF3_BYTEARRAY         : 0x0C,
    AMF3_OBJECT_ENCODING   : 0x03,

    // Object encodings for AMF3 object types
    ET_PROPLIST            : 0x00,
    ET_EXTERNAL            : 0x01,
    ET_DYNAMIC             : 0x02,
    ET_PROXY               : 0x03,

    /**
     * Special content length value that indicates "unknown" content length 
     * per AMF Specification
     */
    UNKNOWN_CONTENT_LENGTH : -1,
    URL_APPEND_HEADER      : 'AppendToGatewayUrl',
    RESULT_METHOD          : '/onResult',
    STATUS_METHOD          : '/onStatus',
};

})();
